Quadrilateral #
In this file we define general quadrilaterals as four points on the plane and convex quadrilaterals.
Important Definitions #
Quadrilateral P
: general quadrilaterals on the planeP
, i.e. four points onP
QuadrilateralND P
: quadrilaterals on the planeP
s.t. the points that adjacent is not sameQuadrilateral_cvx P
: convex quadrilaterals on the planeP
Notation #
QDR A B C D
: notation for quadrilateralA B C D
Implementation Notes #
Currently, we just defines general quadrilaterals, non-degenerate quadrilateral (adjacent points are not the same, or cyclic-non-degenerate) and convex quadrilaterals. There are classes in between. For example, quadrilateral without self-intersection, quadrilateral of stronger non-degenerate (any two points are not same, we call it alternatively-non-degenerate temporarily). Of course many definitions work on these classes already, but without necessarity in application, we will not formalize these class for present.
Class of Quadrilateral: A quadrilateral consists of four points; it is the generalized quadrilateral formed by these four points
- point₁ : P
- point₂ : P
- point₃ : P
- point₄ : P
Instances For
For four points $A$ $B$ $C$ $D$ on a plane, instead of writing Quadrilateral.mk $A$ $B$ $C$ $D$ for the quadrilateral formed by $A$ $B$ $C$ $D$, we use QDR $A$ $B$ $C$ $D$ to denote such a quadrilateral.
Equations
- EuclidGeom.termQDR = Lean.ParserDescr.node `EuclidGeom.termQDR 1024 (Lean.ParserDescr.symbol "QDR")
Instances For
Given a quadrilateral qdr, qdr.edge₁₂ is the edge from the first point to the second point of a quadrilateral.
Equations
- EuclidGeom.Quadrilateral.edge₁₂ = { source := qdr.point₁, target := qdr.point₂ }
Instances For
The edge from the second point to the third point of a quadrilateral
Equations
- EuclidGeom.Quadrilateral.edge₂₃ = { source := qdr.point₂, target := qdr.point₃ }
Instances For
The edge from the third point to the fourth point of a quadrilateral
Equations
- EuclidGeom.Quadrilateral.edge₃₄ = { source := qdr.point₃, target := qdr.point₄ }
Instances For
The edge from the 1st point to the 4th point of a quadrilateral
Equations
- EuclidGeom.Quadrilateral.edge₁₄ = { source := qdr.point₁, target := qdr.point₄ }
Instances For
The diagonal from the first point to the third point of a quadrilateral
Equations
- EuclidGeom.Quadrilateral.diag₁₃ = { source := qdr.point₁, target := qdr.point₃ }
Instances For
The diagonal from the second point to the fourth point of a quadrilateral
Equations
- EuclidGeom.Quadrilateral.diag₂₄ = { source := qdr.point₂, target := qdr.point₄ }
Instances For
The perm quadrilateral, the first point of the perm is the second point of the origin, etc.
Equations
- EuclidGeom.Quadrilateral.perm = { point₁ := qdr.point₂, point₂ := qdr.point₃, point₃ := qdr.point₄, point₄ := qdr.point₁ }
Instances For
The flip quadrilateral, exchanged the second point and the fourth.
Equations
- EuclidGeom.Quadrilateral.flip = { point₁ := qdr.point₁, point₂ := qdr.point₄, point₃ := qdr.point₃, point₄ := qdr.point₂ }
Instances For
A quadrilateral is called non-degenerate if the points that adjacent is not same
- nd₁₂ : qdr.point₂ ≠ qdr.point₁
- nd₂₃ : qdr.point₃ ≠ qdr.point₂
- nd₃₄ : qdr.point₄ ≠ qdr.point₃
- nd₁₄ : qdr.point₄ ≠ qdr.point₁
Instances For
Class of nd Quadrilateral: A nd quadrilateral is quadrilateral with the property of nd.
- point₁ : P
- point₂ : P
- point₃ : P
- point₄ : P
- nd : s.IsND
Instances For
Equations
- EuclidGeom.QuadrilateralND.mk_pt_pt_pt_pt_nd A B C D h = { toQuadrilateral := { point₁ := A, point₂ := B, point₃ := C, point₄ := D }, nd := h }
Instances For
Equations
- EuclidGeom.termQDR_nd = Lean.ParserDescr.node `EuclidGeom.termQDR_nd 1024 (Lean.ParserDescr.symbol "QDR_nd")
Instances For
Given a property that a quadrilateral qdr is nd, this function returns qdr itself as an object in the class of nd quadrilateral
Equations
- EuclidGeom.QuadrilateralND.mk_nd h = { toQuadrilateral := qdr, nd := h }
Instances For
Equations
- EuclidGeom.termQDR_nd' = Lean.ParserDescr.node `EuclidGeom.termQDR_nd' 1024 (Lean.ParserDescr.symbol "QDR_nd'")
Instances For
A quadrilateral satisfies InGPos if every 3 vertices are not collinear.
- not_collinear₁₂₃ : ¬EuclidGeom.Collinear qdr.point₁ qdr.point₂ qdr.point₃
- not_collinear₂₃₄ : ¬EuclidGeom.Collinear qdr.point₂ qdr.point₃ qdr.point₄
- not_collinear₃₄₁ : ¬EuclidGeom.Collinear qdr.point₃ qdr.point₄ qdr.point₁
- not_collinear₄₁₂ : ¬EuclidGeom.Collinear qdr.point₄ qdr.point₁ qdr.point₂
Instances For
The edge from the first point to the second point of a QuadrilateralND is non-degenerate.
Equations
- (_ : EuclidGeom.PtNe qdr_nd.point₂ qdr_nd.point₁) = (_ : Fact (qdr_nd.point₂ ≠ qdr_nd.point₁))
The edge from the first point to the second point of a QuadrilateralND is non-degenerate.
Equations
- (_ : EuclidGeom.PtNe qdr_nd.point₃ qdr_nd.point₂) = (_ : Fact (qdr_nd.point₃ ≠ qdr_nd.point₂))
The edge from the first point to the second point of a QuadrilateralND is non-degenerate.
Equations
- (_ : EuclidGeom.PtNe qdr_nd.point₄ qdr_nd.point₃) = (_ : Fact (qdr_nd.point₄ ≠ qdr_nd.point₃))
The edge from the first point to the second point of a QuadrilateralND is non-degenerate.
Equations
- (_ : EuclidGeom.PtNe qdr_nd.point₄ qdr_nd.point₁) = (_ : Fact (qdr_nd.point₄ ≠ qdr_nd.point₁))
The edge from the first point to the second point of a quadrilateral
Instances For
The edge from the second point to the third point of a quadrilateral
Instances For
The edge from the third point to the fourth point of a quadrilateral
Instances For
The edge from the fourth point to the first point of a quadrilateral
Instances For
angle at point₁ of qdr_nd
Equations
Instances For
angle at point₂ of qdr_nd
Equations
Instances For
angle at point₃ of qdr_nd
Equations
Instances For
angle at point₄ of qdr_nd
Equations
Instances For
triangle point₄ point₁ point₂, which includes angle₁
Equations
- qdr_nd.triangle₁ = { point₁ := qdr_nd.point₄, point₂ := qdr_nd.point₁, point₃ := qdr_nd.point₂ }
Instances For
triangle point₁ point₂ point₃, which includes angle₂
Equations
- qdr_nd.triangle₂ = { point₁ := qdr_nd.point₁, point₂ := qdr_nd.point₂, point₃ := qdr_nd.point₃ }
Instances For
triangle point₂ point₃ point₄, which includes angle₃
Equations
- qdr_nd.triangle₃ = { point₁ := qdr_nd.point₂, point₂ := qdr_nd.point₃, point₃ := qdr_nd.point₄ }
Instances For
triangle point₃ point₄ point₁, which includes angle₄
Equations
- qdr_nd.triangle₄ = { point₁ := qdr_nd.point₃, point₂ := qdr_nd.point₄, point₃ := qdr_nd.point₁ }
Instances For
The perm of QuadrilateralND is also QuadrilateralND.
The perm QuadrilateralND, the first point of the perm is the second point of the origin, etc.
Equations
- qdr_nd.perm = EuclidGeom.QuadrilateralND.mk_nd (_ : EuclidGeom.Quadrilateral.perm.IsND)
Instances For
The flip of QuadrilateralND is also QuadrilateralND.
The flip QuadrilateralND, exchanged the second point and the fourth.
Equations
- qdr_nd.flip = EuclidGeom.QuadrilateralND.mk_nd (_ : EuclidGeom.Quadrilateral.flip.IsND)
Instances For
A Quadrilateral which satisfies InGPos satisfies IsND.
Equations
- EuclidGeom.QuadrilateralND.instCoeInGPosIsND = { coe := (_ : qdr.InGPos → qdr.IsND) }
A Quadrilateral is called convex if it's ND and four angles have the same sign.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- EuclidGeom.term_IsConvex = Lean.ParserDescr.trailingNode `EuclidGeom.term_IsConvex 50 50 (Lean.ParserDescr.symbol "IsConvex")
Instances For
Equations
- EuclidGeom.instCoeIsConvexIsND = { coe := (_ : qdr.IsConvex → qdr.IsND) }
Equations
- EuclidGeom.instCoeIsConvexToQuadrilateral = { coe := (_ : qdr_nd.IsConvex → qdr_nd.IsConvex) }
Equations
- EuclidGeom.instCoeIsConvexToQuadrilateral_1 = { coe := (_ : qdr_nd.IsConvex → qdr_nd.IsConvex) }
Class of Convex Quadrilateral: A convex quadrilateral is quadrilateral with the property of convex.
- point₁ : P
- point₂ : P
- point₃ : P
- point₄ : P
- nd : s.IsND
- convex : s.IsConvex
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- EuclidGeom.termQDR_cvx = Lean.ParserDescr.node `EuclidGeom.termQDR_cvx 1024 (Lean.ParserDescr.symbol "QDR_cvx")
Instances For
Equations
- EuclidGeom.Quadrilateral_cvx.mk_cvx h = { toQuadrilateralND := EuclidGeom.QuadrilateralND.mk_nd (_ : qdr.IsND), convex := h }
Instances For
Equations
- EuclidGeom.termQDR_cvx' = Lean.ParserDescr.node `EuclidGeom.termQDR_cvx' 1024 (Lean.ParserDescr.symbol "QDR_cvx'")
Instances For
- qdr_nd : EuclidGeom.QuadrilateralND P
- same_side₁ : EuclidGeom.odist_sign s.qdr_nd.point₁ s.qdr_nd.edgeND₃₄ = EuclidGeom.odist_sign s.qdr_nd.point₂ s.qdr_nd.edgeND₃₄
- same_side₂ : EuclidGeom.odist_sign s.qdr_nd.point₂ s.qdr_nd.edgeND₄₁ = EuclidGeom.odist_sign s.qdr_nd.point₃ s.qdr_nd.edgeND₄₁
- same_side₃ : EuclidGeom.odist_sign s.qdr_nd.point₃ s.qdr_nd.edgeND₁₂ = EuclidGeom.odist_sign s.qdr_nd.point₄ s.qdr_nd.edgeND₁₂
Instances For
- qdr : EuclidGeom.Quadrilateral P
- ne₁ : s.qdr.point₁ ≠ s.qdr.point₃
- ne₂ : s.qdr.point₂ ≠ s.qdr.point₄
- diag₁₃ : EuclidGeom.SegND P
- diag₂₄ : EuclidGeom.SegND P
- not_para : ¬EuclidGeom.Parallel s.diag₁₃ s.diag₂₄
- inx_lies_int₁ : EuclidGeom.lies_int (EuclidGeom.Line.inx s.diag₁₃.toLine s.diag₂₄.toLine (_ : ¬EuclidGeom.Parallel s.diag₁₃ s.diag₂₄)) s.diag₁₃
- inx_lies_int₂ : EuclidGeom.lies_int (EuclidGeom.Line.inx s.diag₁₃.toLine s.diag₂₄.toLine (_ : ¬EuclidGeom.Parallel s.diag₁₃ s.diag₂₄)) s.diag₂₄
Instances For
The perm of quadrilateral_cvx is also quadrilateral_cvx.
The perm quadrilateral_cvx, the first point of the perm is the second point of the origin, etc.
Equations
- EuclidGeom.Quadrilateral_cvx.perm qdr_cvx = EuclidGeom.Quadrilateral_cvx.mk_cvx (_ : qdr_cvx.perm.IsConvex)
Instances For
Given a convex quadrilateral qdr_cvx ABCD, quadrilateral QDR BCDA is also convex.
The flip of quadrilateral_cvx is also quadrilateral_cvx.
Equations
- EuclidGeom.Quadrilateral_cvx.flip qdr_cvx = EuclidGeom.Quadrilateral_cvx.mk_cvx (_ : qdr_cvx.flip.IsConvex)
Instances For
Given a convex quadrilateral qdr_cvx, diagonal from the first point to the second point is not degenerate, i.e. the second point is not equal to the first point.
Equations
- (_ : EuclidGeom.PtNe qdr_cvx.point₃ qdr_cvx.point₁) = (_ : Fact (qdr_cvx.point₃ ≠ qdr_cvx.point₁))
Given a convex quadrilateral qdr_cvx, diagonal from the first point to the second point is not degenerate, i.e. the second point is not equal to the first point.
Equations
- One or more equations did not get rendered due to their size.
The non-degenerate diagonal from the first point and third point of a convex quadrilateral
Equations
- EuclidGeom.Quadrilateral_cvx.diag_nd₁₃ qdr_cvx = SEG_nd qdr_cvx.point₁ qdr_cvx.point₃ (_ : qdr_cvx.point₃ ≠ qdr_cvx.point₁)
Instances For
The non-degenerate diagonal from the second point and fourth point of a convex quadrilateral
Equations
- EuclidGeom.Quadrilateral_cvx.diag_nd₂₄ qdr_cvx = SEG_nd qdr_cvx.point₂ qdr_cvx.point₄ (_ : qdr_cvx.point₄ ≠ qdr_cvx.point₂)
Instances For
Two diagonals are not parallel to each other
The intersection point of two diagonals
Equations
- One or more equations did not get rendered due to their size.
Instances For
The interior of two diagonals intersect at one point, i.e. the intersection point of the underlying lines of the diagonals lies in the interior of both diagonals.
Given a convex quadrilateral qdr_cvx, its 1st, 2nd and 3rd points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₁ point₂}$ is not the same as the projective direction of the vector $\overrightarrow{point₁ point₃}$.
Given a convex quadrilateral qdr_cvx, its 2nd, 3rd and 4th points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₂ point₃}$ is not the same as the projective direction of the vector $\overrightarrow{point₂ point₄}$.
Given a convex quadrilateral qdr_cvx, its 3rd, 4th and 1st points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₃ point₄}$ is not the same as the projective direction of the vector $\overrightarrow{point₃ point₁}$.
Given a convex quadrilateral qdr_cvx, its 4th, 1st and 3rd points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₃ point₄}$ is not the same as the projective direction of the vector $\overrightarrow{point₃ point₁}$.
Given a convex quadrilateral qdr_cvx, its 4th, 3rd and 1st points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₃ point₄}$ is not the same as the projective direction of the vector $\overrightarrow{point₃ point₁}$.
Given a convex quadrilateral qdr_cvx, its 1st, 4th and 3rd points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₃ point₄}$ is not the same as the projective direction of the vector $\overrightarrow{point₃ point₁}$.
Given a convex quadrilateral qdr_cvx, its 4th, 1st and 2nd points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₄ point₁}$ is not the same as the projective direction of the vector $\overrightarrow{point₄ point₂}$.
Given a convex quadrilateral qdr_cvx, its 2nd, 1st and 4th points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₄ point₁}$ is not the same as the projective direction of the vector $\overrightarrow{point₄ point₂}$.
Given a convex quadrilateral qdr_cvx, its 1st, 4th and 2nd points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₄ point₁}$ is not the same as the projective direction of the vector $\overrightarrow{point₄ point₂}$.
Given a convex quadrilateral qdr_cvx, its 1st, 2nd and 4th points are not collinear, i.e. the projective direction of the vector $\overrightarrow{point₄ point₁}$ is not the same as the projective direction of the vector $\overrightarrow{point₄ point₂}$.
triangle point₄ point₁ point₂, which includes angle₁
Equations
- qdr_cvx.triangle_nd₁ = { val := qdr_cvx.triangle₁, property := (_ : ¬EuclidGeom.Collinear qdr_cvx.point₄ qdr_cvx.point₁ qdr_cvx.point₂) }
Instances For
triangle point₁ point₂ point₃, which includes angle₂
Equations
- qdr_cvx.triangle_nd₂ = { val := qdr_cvx.triangle₂, property := (_ : ¬EuclidGeom.Collinear qdr_cvx.point₁ qdr_cvx.point₂ qdr_cvx.point₃) }
Instances For
triangle point₂ point₃ point₄, which includes angle₃
Equations
- qdr_cvx.triangle_nd₃ = { val := qdr_cvx.triangle₃, property := (_ : ¬EuclidGeom.Collinear qdr_cvx.point₂ qdr_cvx.point₃ qdr_cvx.point₄) }
Instances For
triangle point₃ point₄ point₁, which includes angle₄
Equations
- qdr_cvx.triangle_nd₄ = { val := qdr_cvx.triangle₄, property := (_ : ¬EuclidGeom.Collinear qdr_cvx.point₃ qdr_cvx.point₄ qdr_cvx.point₁) }