Documentation

Mathlib.Geometry.Euclidean.Angle.Oriented.Basic

Oriented angles. #

This file defines oriented angles in real inner product spaces.

Main definitions #

Implementation notes #

The definitions here use the Real.angle type, angles modulo 2 * π. For some purposes, angles modulo π are more convenient, because results are true for such angles with less configuration dependence. Results that are only equalities modulo π can be represented modulo 2 * π as equalities of (2 : ℤ) • θ.

References #

The oriented angle from x to y, modulo 2 * π. If either vector is 0, this is 0. See InnerProductGeometry.angle for the corresponding unoriented angle definition.

Equations
Instances For
    theorem Orientation.continuousAt_oangle {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V × V} (hx1 : x.1 0) (hx2 : x.2 0) :
    ContinuousAt (fun (y : V × V) => Orientation.oangle o y.1 y.2) x

    Oriented angles are continuous when the vectors involved are nonzero.

    @[simp]

    If the first vector passed to oangle is 0, the result is 0.

    @[simp]

    If the second vector passed to oangle is 0, the result is 0.

    @[simp]

    If the two vectors passed to oangle are the same, the result is 0.

    If the angle between two vectors is nonzero, the first vector is nonzero.

    If the angle between two vectors is nonzero, the second vector is nonzero.

    If the angle between two vectors is nonzero, the vectors are not equal.

    If the angle between two vectors is π, the first vector is nonzero.

    If the angle between two vectors is π, the second vector is nonzero.

    If the angle between two vectors is π, the vectors are not equal.

    If the angle between two vectors is π / 2, the first vector is nonzero.

    If the angle between two vectors is π / 2, the second vector is nonzero.

    If the angle between two vectors is π / 2, the vectors are not equal.

    If the angle between two vectors is -π / 2, the first vector is nonzero.

    If the angle between two vectors is -π / 2, the second vector is nonzero.

    If the angle between two vectors is -π / 2, the vectors are not equal.

    If the sign of the angle between two vectors is nonzero, the first vector is nonzero.

    If the sign of the angle between two vectors is nonzero, the second vector is nonzero.

    If the sign of the angle between two vectors is nonzero, the vectors are not equal.

    If the sign of the angle between two vectors is positive, the first vector is nonzero.

    If the sign of the angle between two vectors is positive, the second vector is nonzero.

    If the sign of the angle between two vectors is positive, the vectors are not equal.

    If the sign of the angle between two vectors is negative, the first vector is nonzero.

    If the sign of the angle between two vectors is negative, the second vector is nonzero.

    If the sign of the angle between two vectors is negative, the vectors are not equal.

    Swapping the two vectors passed to oangle negates the angle.

    @[simp]

    Adding the angles between two vectors in each order results in 0.

    theorem Orientation.oangle_neg_left {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} (hx : x 0) (hy : y 0) :

    Negating the first vector passed to oangle adds π to the angle.

    theorem Orientation.oangle_neg_right {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} (hx : x 0) (hy : y 0) :

    Negating the second vector passed to oangle adds π to the angle.

    @[simp]

    Negating the first vector passed to oangle does not change twice the angle.

    @[simp]

    Negating the second vector passed to oangle does not change twice the angle.

    @[simp]

    Negating both vectors passed to oangle does not change the angle.

    Negating the first vector produces the same angle as negating the second vector.

    @[simp]

    The angle between the negation of a nonzero vector and that vector is π.

    @[simp]

    The angle between a nonzero vector and its negation is π.

    Twice the angle between the negation of a vector and that vector is 0.

    Twice the angle between a vector and its negation is 0.

    @[simp]

    Adding the angles between two vectors in each order, with the first vector in each angle negated, results in 0.

    @[simp]

    Adding the angles between two vectors in each order, with the second vector in each angle negated, results in 0.

    @[simp]

    Multiplying the first vector passed to oangle by a positive real does not change the angle.

    @[simp]

    Multiplying the second vector passed to oangle by a positive real does not change the angle.

    @[simp]
    theorem Orientation.oangle_smul_left_of_neg {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (x : V) (y : V) {r : } (hr : r < 0) :

    Multiplying the first vector passed to oangle by a negative real produces the same angle as negating that vector.

    @[simp]

    Multiplying the second vector passed to oangle by a negative real produces the same angle as negating that vector.

    @[simp]

    The angle between a nonnegative multiple of a vector and that vector is 0.

    @[simp]

    The angle between a vector and a nonnegative multiple of that vector is 0.

    @[simp]
    theorem Orientation.oangle_smul_smul_self_of_nonneg {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (x : V) {r₁ : } {r₂ : } (hr₁ : 0 r₁) (hr₂ : 0 r₂) :
    Orientation.oangle o (r₁ x) (r₂ x) = 0

    The angle between two nonnegative multiples of the same vector is 0.

    @[simp]

    Multiplying the first vector passed to oangle by a nonzero real does not change twice the angle.

    @[simp]

    Multiplying the second vector passed to oangle by a nonzero real does not change twice the angle.

    @[simp]

    Twice the angle between a multiple of a vector and that vector is 0.

    @[simp]

    Twice the angle between a vector and a multiple of that vector is 0.

    @[simp]
    theorem Orientation.two_zsmul_oangle_smul_smul_self {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (x : V) {r₁ : } {r₂ : } :
    2 Orientation.oangle o (r₁ x) (r₂ x) = 0

    Twice the angle between two multiples of a vector is 0.

    If the spans of two vectors are equal, twice angles with those vectors on the left are equal.

    If the spans of two vectors are equal, twice angles with those vectors on the right are equal.

    If the spans of two pairs of vectors are equal, twice angles between those vectors are equal.

    The oriented angle between two vectors is zero if and only if the angle with the vectors swapped is zero.

    The oriented angle between two vectors is zero if and only if they are on the same ray.

    The oriented angle between two vectors is π if and only if the angle with the vectors swapped is π.

    The oriented angle between two vectors is π if and only they are nonzero and the first is on the same ray as the negation of the second.

    The oriented angle between two vectors is zero or π if and only if those two vectors are not linearly independent.

    The oriented angle between two vectors is zero or π if and only if the first vector is zero or the second is a multiple of the first.

    The oriented angle between two vectors is not zero or π if and only if those two vectors are linearly independent.

    Two vectors are equal if and only if they have equal norms and zero angle between them.

    Two vectors with equal norms are equal if and only if they have zero angle between them.

    Two vectors with zero angle between them are equal if and only if they have equal norms.

    @[simp]
    theorem Orientation.oangle_add {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, the angle between the first and the second plus the angle between the second and the third equals the angle between the first and the third.

    @[simp]
    theorem Orientation.oangle_add_swap {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, the angle between the second and the third plus the angle between the first and the second equals the angle between the first and the third.

    @[simp]
    theorem Orientation.oangle_sub_left {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, the angle between the first and the third minus the angle between the first and the second equals the angle between the second and the third.

    @[simp]
    theorem Orientation.oangle_sub_right {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, the angle between the first and the third minus the angle between the second and the third equals the angle between the first and the second.

    @[simp]
    theorem Orientation.oangle_add_cyc3 {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, adding the angles between them in cyclic order results in 0.

    @[simp]
    theorem Orientation.oangle_add_cyc3_neg_left {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, adding the angles between them in cyclic order, with the first vector in each angle negated, results in π. If the vectors add to 0, this is a version of the sum of the angles of a triangle.

    @[simp]
    theorem Orientation.oangle_add_cyc3_neg_right {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) {x : V} {y : V} {z : V} (hx : x 0) (hy : y 0) (hz : z 0) :

    Given three nonzero vectors, adding the angles between them in cyclic order, with the second vector in each angle negated, results in π. If the vectors add to 0, this is a version of the sum of the angles of a triangle.

    Pons asinorum, oriented vector angle form.

    The angle at the apex of an isosceles triangle is π minus twice a base angle, oriented vector angle form.

    @[simp]

    The angle between two vectors, with respect to an orientation given by Orientation.map with a linear isometric equivalence, equals the angle between those two vectors, transformed by the inverse of that equivalence, with respect to the original orientation.

    theorem Orientation.oangle_map_complex {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (f : V ≃ₗᵢ[] ) (hf : (Orientation.map (Fin 2) f.toLinearEquiv) o = Complex.orientation) (x : V) (y : V) :
    Orientation.oangle o x y = (Complex.arg ((starRingEnd ) (f x) * f y))

    The oriented angle on an oriented real inner product space of dimension 2 can be evaluated in terms of a complex-number representation of the space.

    Negating the orientation negates the value of oangle.

    The inner product of two vectors is the product of the norms and the cosine of the oriented angle between the vectors.

    The cosine of the oriented angle between two nonzero vectors is the inner product divided by the product of the norms.

    The cosine of the oriented angle between two nonzero vectors equals that of the unoriented angle.

    The oriented angle between two nonzero vectors is plus or minus the unoriented angle.

    The unoriented angle between two nonzero vectors is the absolute value of the oriented angle, converted to a real.

    If the sign of the oriented angle between two vectors is zero, either one of the vectors is zero or the unoriented angle is 0 or π.

    If two unoriented angles are equal, and the signs of the corresponding oriented angles are equal, then the oriented angles are equal (even in degenerate cases).

    If the signs of two oriented angles between nonzero vectors are equal, the oriented angles are equal if and only if the unoriented angles are equal.

    The oriented angle between two vectors equals the unoriented angle if the sign is positive.

    The oriented angle between two vectors equals minus the unoriented angle if the sign is negative.

    The oriented angle between two nonzero vectors is zero if and only if the unoriented angle is zero.

    The oriented angle between two vectors is π if and only if the unoriented angle is π.

    One of two vectors is zero or the oriented angle between them is plus or minus π / 2 if and only if the inner product of those vectors is zero.

    If the oriented angle between two vectors is π / 2, the inner product of those vectors is zero.

    If the oriented angle between two vectors is π / 2, the inner product of those vectors (reversed) is zero.

    If the oriented angle between two vectors is -π / 2, the inner product of those vectors is zero.

    If the oriented angle between two vectors is -π / 2, the inner product of those vectors (reversed) is zero.

    @[simp]

    Negating the first vector passed to oangle negates the sign of the angle.

    @[simp]

    Negating the second vector passed to oangle negates the sign of the angle.

    @[simp]

    Multiplying the first vector passed to oangle by a real multiplies the sign of the angle by the sign of the real.

    @[simp]

    Multiplying the second vector passed to oangle by a real multiplies the sign of the angle by the sign of the real.

    Auxiliary lemma for the proof of oangle_sign_smul_add_right; not intended to be used outside of that proof.

    @[simp]

    Adding a multiple of the first vector passed to oangle to the second vector does not change the sign of the angle.

    @[simp]

    Adding a multiple of the second vector passed to oangle to the first vector does not change the sign of the angle.

    @[simp]

    Subtracting a multiple of the first vector passed to oangle from the second vector does not change the sign of the angle.

    @[simp]

    Subtracting a multiple of the second vector passed to oangle from the first vector does not change the sign of the angle.

    @[simp]

    Adding the first vector passed to oangle to the second vector does not change the sign of the angle.

    @[simp]

    Adding the second vector passed to oangle to the first vector does not change the sign of the angle.

    @[simp]

    Subtracting the first vector passed to oangle from the second vector does not change the sign of the angle.

    @[simp]

    Subtracting the second vector passed to oangle from the first vector does not change the sign of the angle.

    @[simp]

    Subtracting the second vector passed to oangle from a multiple of the first vector negates the sign of the angle.

    @[simp]

    Subtracting the first vector passed to oangle from a multiple of the second vector negates the sign of the angle.

    Subtracting the second vector passed to oangle from the first vector negates the sign of the angle.

    Subtracting the first vector passed to oangle from the second vector negates the sign of the angle.

    @[simp]

    Subtracting the first vector passed to oangle from the second vector then swapping the vectors does not change the sign of the angle.

    @[simp]

    Subtracting the second vector passed to oangle from the first vector then swapping the vectors does not change the sign of the angle.

    theorem Orientation.oangle_sign_smul_add_smul_right {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (x : V) (y : V) (r₁ : ) (r₂ : ) :
    Real.Angle.sign (Orientation.oangle o x (r₁ x + r₂ y)) = SignType.sign r₂ * Real.Angle.sign (Orientation.oangle o x y)

    The sign of the angle between a vector, and a linear combination of that vector with a second vector, is the sign of the factor by which the second vector is multiplied in that combination multiplied by the sign of the angle between the two vectors.

    theorem Orientation.oangle_sign_smul_add_smul_left {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (x : V) (y : V) (r₁ : ) (r₂ : ) :
    Real.Angle.sign (Orientation.oangle o (r₁ x + r₂ y) y) = SignType.sign r₁ * Real.Angle.sign (Orientation.oangle o x y)

    The sign of the angle between a linear combination of two vectors and the second vector is the sign of the factor by which the first vector is multiplied in that combination multiplied by the sign of the angle between the two vectors.

    theorem Orientation.oangle_sign_smul_add_smul_smul_add_smul {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [Fact (FiniteDimensional.finrank V = 2)] (o : Orientation V (Fin 2)) (x : V) (y : V) (r₁ : ) (r₂ : ) (r₃ : ) (r₄ : ) :
    Real.Angle.sign (Orientation.oangle o (r₁ x + r₂ y) (r₃ x + r₄ y)) = SignType.sign (r₁ * r₄ - r₂ * r₃) * Real.Angle.sign (Orientation.oangle o x y)

    The sign of the angle between two linear combinations of two vectors is the sign of the determinant of the factors in those combinations multiplied by the sign of the angle between the two vectors.

    A base angle of an isosceles triangle is acute, oriented vector angle form.

    A base angle of an isosceles triangle is acute, oriented vector angle form.